# $Id$
# Maintainer: Andreas Radke <andyrtr@archlinux.org>

pkgname=tzdata
pkgver=2018e
pkgrel=1
pkgdesc="Sources for time zone and daylight saving time data"
arch=('any')
url="http://www.iana.org/time-zones"
license=('GPL')
options=('!emptydirs')
# new signing key is not available via public keyservers
source=(https://www.iana.org/time-zones/repository/releases/${pkgname}${pkgver}.tar.gz{,.asc})
sha512sums=('d059fcd381b2f6ecdafcd68fdd2a00451d1bf9b1affeb164ae7cabca2e022d499e77f0706ec3f3091b8e84c2211aa66da6c90937108771f1bf070cfebc105cae'
            'SKIP')
validpgpkeys=('7E3792A9D8ACF7D633BC1588ED97E90E62AA7E34') # Paul Eggert <eggert@cs.ucla.edu>

timezones=('africa' 'antarctica' 'asia' 'australasia'
           'europe' 'northamerica' 'southamerica'
           'pacificnew' 'etcetera' 'backward'
           'systemv' 'factory')

package() {
  cd ${srcdir}
  zic -y ./yearistype -d ${pkgdir}/usr/share/zoneinfo ${timezones[@]}
  zic -y ./yearistype -d ${pkgdir}/usr/share/zoneinfo/posix ${timezones[@]}
  zic -y ./yearistype -d ${pkgdir}/usr/share/zoneinfo/right -L leapseconds ${timezones[@]}
  
  zic -y ./yearistype -d ${pkgdir}/usr/share/zoneinfo -p America/New_York
  install -m444 -t ${pkgdir}/usr/share/zoneinfo iso3166.tab zone1970.tab zone.tab # zone.tab is depricated and will go soon
}
